import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '发放ID',
    align:"center",
    dataIndex: 'grantId'
   },
   {
    title: '发放人员ID',
    align:"center",
    dataIndex: 'peopleId'
   },
   {
    title: '发放人员姓名',
    align:"center",
    dataIndex: 'peopleName'
   },
   {
    title: '发放金额',
    align:"center",
    dataIndex: 'amt'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '身份证号码',
    align:"center",
    dataIndex: 'peopleIdCard'
   },
   {
    title: '上级补偿项ID',
    align:"center",
    dataIndex: 'superPayId'
   },
   {
    title: '上级补偿项名称',
    align:"center",
    dataIndex: 'superPayName'
   },
   {
    title: '项目ID',
    align:"center",
    dataIndex: 'payId'
   },
   {
    title: '项目付款名称',
    align:"center",
    dataIndex: 'payName'
   },
   {
    title: '财评金额',
    align:"center",
    dataIndex: 'cpAmt'
   },
   {
    title: '发放金额',
    align:"center",
    dataIndex: 'payAmt'
   },
   {
    title: '未发金额',
    align:"center",
    dataIndex: 'unPayAmt'
   },
   {
    title: '单位',
    align:"center",
    dataIndex: 'unit'
   },
   {
    title: 'disCount',
    align:"center",
    dataIndex: 'disCount'
   },
   {
    title: 'quantity',
    align:"center",
    dataIndex: 'quantity'
   },
   {
    title: 'unitPrice',
    align:"center",
    dataIndex: 'unitPrice'
   },
   {
    title: '财评ID',
    align:"center",
    dataIndex: 'finEvalId'
   },
   {
    title: 'unPayQuantity',
    align:"center",
    dataIndex: 'unPayQuantity'
   },
   {
    title: '财评明细ID',
    align:"center",
    dataIndex: 'finEvalDetailId'
   },
   {
    title: 'superPayCode',
    align:"center",
    dataIndex: 'superPayCode'
   },
   {
    title: 'payCode',
    align:"center",
    dataIndex: 'payCode'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '发放ID',
    field: 'grantId',
    component: 'Input',
  },
  {
    label: '发放人员ID',
    field: 'peopleId',
    component: 'Input',
  },
  {
    label: '发放人员姓名',
    field: 'peopleName',
    component: 'Input',
  },
  {
    label: '发放金额',
    field: 'amt',
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '身份证号码',
    field: 'peopleIdCard',
    component: 'Input',
  },
  {
    label: '上级补偿项ID',
    field: 'superPayId',
    component: 'Input',
  },
  {
    label: '上级补偿项名称',
    field: 'superPayName',
    component: 'Input',
  },
  {
    label: '项目ID',
    field: 'payId',
    component: 'Input',
  },
  {
    label: '项目付款名称',
    field: 'payName',
    component: 'Input',
  },
  {
    label: '财评金额',
    field: 'cpAmt',
    component: 'InputNumber',
  },
  {
    label: '发放金额',
    field: 'payAmt',
    component: 'InputNumber',
  },
  {
    label: '未发金额',
    field: 'unPayAmt',
    component: 'InputNumber',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: 'disCount',
    field: 'disCount',
    component: 'InputNumber',
  },
  {
    label: 'quantity',
    field: 'quantity',
    component: 'InputNumber',
  },
  {
    label: 'unitPrice',
    field: 'unitPrice',
    component: 'InputNumber',
  },
  {
    label: '财评ID',
    field: 'finEvalId',
    component: 'Input',
  },
  {
    label: 'unPayQuantity',
    field: 'unPayQuantity',
    component: 'InputNumber',
  },
  {
    label: '财评明细ID',
    field: 'finEvalDetailId',
    component: 'Input',
  },
  {
    label: 'superPayCode',
    field: 'superPayCode',
    component: 'Input',
  },
  {
    label: 'payCode',
    field: 'payCode',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  grantId: {title: '发放ID',order: 0,view: 'text', type: 'string',},
  peopleId: {title: '发放人员ID',order: 1,view: 'text', type: 'string',},
  peopleName: {title: '发放人员姓名',order: 2,view: 'text', type: 'string',},
  amt: {title: '发放金额',order: 3,view: 'number', type: 'number',},
  remark: {title: '备注',order: 4,view: 'text', type: 'string',},
  peopleIdCard: {title: '身份证号码',order: 5,view: 'text', type: 'string',},
  superPayId: {title: '上级补偿项ID',order: 6,view: 'text', type: 'string',},
  superPayName: {title: '上级补偿项名称',order: 7,view: 'text', type: 'string',},
  payId: {title: '项目ID',order: 8,view: 'text', type: 'string',},
  payName: {title: '项目付款名称',order: 9,view: 'text', type: 'string',},
  cpAmt: {title: '财评金额',order: 10,view: 'number', type: 'number',},
  payAmt: {title: '发放金额',order: 11,view: 'number', type: 'number',},
  unPayAmt: {title: '未发金额',order: 12,view: 'number', type: 'number',},
  unit: {title: '单位',order: 13,view: 'text', type: 'string',},
  disCount: {title: 'disCount',order: 14,view: 'number', type: 'number',},
  quantity: {title: 'quantity',order: 15,view: 'number', type: 'number',},
  unitPrice: {title: 'unitPrice',order: 16,view: 'number', type: 'number',},
  finEvalId: {title: '财评ID',order: 17,view: 'text', type: 'string',},
  unPayQuantity: {title: 'unPayQuantity',order: 18,view: 'number', type: 'number',},
  finEvalDetailId: {title: '财评明细ID',order: 19,view: 'text', type: 'string',},
  superPayCode: {title: 'superPayCode',order: 20,view: 'text', type: 'string',},
  payCode: {title: 'payCode',order: 21,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}